import { getLevelZero, getLevelFirst, getUserID, getCompanyID, getUserDepID } from '@/utils';

/**
 * @param curRes
 * @returns
 */
const getManageTabSwitch = (curRes: Record<string, any>) => {
  if (curRes?.['/assetStatistics/useCompanyID']) {
    return {
      useCompanyID: getCompanyID(),
      params: 'useCompanyID',
    };
  } else if (curRes?.['/assetStatistics/useDepartmentID']) {
    return {
      useDepartmentID: getUserDepID(),
      params: 'useDepartmentID',
    };
  } else if (curRes?.['/assetStatistics/userID']) {
    return {
      userID: getUserID(),
      params: 'userID',
    };
  } else {
    return {};
  }
};

export { getManageTabSwitch };
